#!/bin/sh

#  -c, --compile      compile to JavaScript and save as .js files
#  -i, --interactive  run an interactive CoffeeScript REPL
#  -o, --output       set the directory for compiled JavaScript
#  -j, --join         concatenate the scripts before compiling
#  -w, --watch        watch scripts for changes, and recompile
#  -p, --print        print the compiled JavaScript to stdout
#  -l, --lint         pipe the compiled JavaScript through JSLint
#  -s, --stdio        listen for and compile scripts over stdio
#  -e, --eval         compile a string from the command line
#  -r, --require      require a library before executing your script
#  -b, --bare         compile without the top-level function wrapper
#  -t, --tokens       print the tokens that the lexer produces
#  -n, --nodes        print the parse tree that Jison produces
#      --nodejs       pass options through to the "node" binary
#  -v, --version      display CoffeeScript version
#  -h, --help         display this help message
chown -R jean-cedric web/js web/node
rm web/js/*.js web/node/*.js
coffee -o web/js/ --join --compile src/js-coffee/*.coffee
coffee -o web/node/ --join --bare --compile src/node-coffee/*.coffee
rm docs/*.html
docco src/js-coffee/*.coffee
docco src/node-coffee/*.coffee
mv web/js/concatenation.js web/js/main.js
mv web/node/concatenation.js web/node/main.js
